home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-07-11 | 2.3 KB | 88 lines | [TEXT/EDIT] |
- RotatePPC 0.1d1
- ===============
-
- This is a Power Macintosh only program that reads a set of
- 3-dimensional points and lines and plots them in a window.
- The image can then be rotated with the mouse in real time.
-
- The provided source code demonstates a basic PPC C program
- that can handle the required apple events, set up and use
- an offscreen GWorld, get a file using StandardFile and
- read that file with standard C routines.
-
- The resource file contains code that will put up an alert
- on non-PPC machines and quit.
-
- The project file is for the Metrowerks PPC C DR/3 compiler.
-
-
- Rotating the Image
- ------------------
-
- The image is rotated by holding the mouse button down and
- moving it around.
- left-right rotates about the z-axis
- up-down rotates around the x-axis
- The Rotate Slow menu rotates the image about the z-axis in
- one degree increments until the mouse is pressed.
- The Rotate Fast menu rotates the image about the z-axis in
- two degree increments until the mouse is pressed.
-
-
- Format of the Input File
- ------------------------
-
- The input file consists of sets of four points on each line
-
- x y z c
-
- x = x coordinate of a point (real)
- y = y coordinate of a point (real)
- z = z coordinate of a point (real)
- c = color and/or drawing method (integer)
-
- if (c = 0) move to the x,y,z point without drawing
- if (c > 0) draw a line to the x,y,z point from the current
- position using color c
- if (c < 0) draw a dot at x,y,z using color -c
-
- where
- if (c = 1) color is red
- if (c = 2) color is green
- if (c = 3) color is blue
- if (c > 3) color is white
-
- eg
- 0.5 2.3 -1 0 # moves to point 0.5 2.3 -1 without drawing
- 3 5 6 2 # draws red line from 0.05 2.3 -1 to 3 5 6
- 5 -5 2 -3 # plots blue dot at 5 -5 2
-
- The input file can be any text file. Only 4 numbers to a
- line and no extra text.
-
- The points are scaled to fit in the window and rotation
- is about 0,0,0.
-
-
- Notes
- -----
-
- A Power Macintosh 6100 can handle 500 input lines reasonably
- comfortably.
-
- The executable is compiled for a maximum of 2500 input lines.
-
- This program and the source are free and I take no responsibility
- if it kills your machine or drives you mad.
-
- E-mail me if you find a use for it or come up with a killer
- set of points/lines. I am also interested in other methods for
- rotating 3d points (esp the trackball rotation).
-
- ---
-
- Enjoy
-
- Craig Kloeden <craig@raru.adelaide.edu.au>
- 12 June 1994
-